package module;

import java.util.Objects;

public class Student {
	
	private String id;
	private String name;
	private String gender;
	private String birthday;
	private Double math;
	private Double java;
	private Double sports;
	private Double totalScore;
	
	public Student() {
		
	}

	public Student(String id, String name, String gender, String birthday, Double math, Double java, Double sports,
			Double totalScore) {
		this.id = id;
		this.name = name;
		this.gender = gender;
		this.birthday = birthday;
		this.math = math;
		this.java = java;
		this.sports = sports;
		this.totalScore = totalScore;
	}
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getGender() {
		return gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	public String getBirthday() {
		return birthday;
	}

	public void setBirthday(String birthday) {
		this.birthday = birthday;
	}

	public Double getMath() {
		return math;
	}

	public void setMath(Double math) {
		this.math = math;
	}

	public Double getJava() {
		return java;
	}

	public void setJava(Double java) {
		this.java = java;
	}

	public Double getSports() {
		return sports;
	}

	public void setSports(Double sports) {
		this.sports = sports;
	}

	public Double getTotalScore() {
		return totalScore;
	}

	public void setTotalScore(Double totalScore) {
		this.totalScore = totalScore;
	}

	@Override
	public String toString() {
		return "Student [id=" + id + ", name=" + name + ", gender=" + gender + ", birthday=" + birthday + ", math="
				+ math + ", java=" + java + ", sports=" + sports + ", totalScore=" + totalScore + "]";
	}	


    @Override
    public boolean equals(Object obj) {
        if(obj == null){
            return false;
        }
        Student temp = (Student) obj;
        if(!this.name.contains(temp.name)){
            return false;
        }
        if(!this.name.equals(temp.name)){
            return false;
        }
        return true;
    }
        
        
        
}